package day12.innera;

/**
 * @author oldliu
 * @since 1.0
 */
public class Hotel {
    private String name;
    private String tele;
    public Zhizhao zhizhao=new Zhizhao();

    public Hotel(String name, String tele,String no) {
        this.name = name;
        this.tele = tele;
        this.zhizhao.setNo(no);
    }
    public void show(){
        System.out.println("这家宾馆叫"+name+",电话号码是："+tele);
    }

    public class Zhizhao{
        private String no;
        public void setNo(String n){
            this.no=n;
        }
        public void show(){
            System.out.println("执照号："+no);
            System.out.println("颁发给了:"+name+"，电话是："+tele);
            //普通的内部类持有外部类的对象
            //外部类的名称.this
            Hotel.this.show();//!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
        }
    }
    public void prepare(String rooNo){
        // Cleaner c=new Cleaner("laozhang","nan");
    }
    public void doClean(String roomNo){
        class Cleaner{
            private String name;
            private String sex;

            public Cleaner(String name, String sex) {
                this.name = name;
                this.sex = sex;
            }
            public void dasao(){
                System.out.println(name+"正在打扫房间："+roomNo);
            }
            @Override
            public String toString() {
                return "Cleaner{" +
                        "name='" + name + '\'' +
                        ", sex='" + sex + '\'' +
                        '}';
            }
        }
        Cleaner laowu=new Cleaner("老吴","男");
        laowu.dasao();
        laowu.dasao();
    }
}
